<?php
$this->breadcrumbs=array(
	'Parcelas'=>array('index'),
	'Gerenciar',
);

Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$.fn.yiiGridView.update('cad-parcela-grid', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<?php 
// echo CHtml::link('Advanced Search','#',array('class'=>'search-button')); ?>
<div class="search-form" style="display:none">
<?php 
// $this->renderPartial('_search',array(
//	'model'=>$model,
//)); ?>
</div><!-- search-form -->

<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'cad-parcela-grid',
        'pager' => array('cssFile' => Yii::app()->baseUrl . '/themes/'.Yii::app()->theme->name.'/gridView.css'),
        'cssFile' => Yii::app()->baseUrl . '/themes/'.Yii::app()->theme->name.'/css/gridView.css',     
	'dataProvider'=>$model->search(),
	'filter'=>$model,
	'columns'=>array(
		'cod_parcela',
		'nome',
		'cod_entrada',
                array(
                       'name'=>'status',
                       'type'=>'raw',
                       'value'=>'Lookup:: item("Baixa",$data->status)'
                    ),
		'parcela',
                'valor', 
                'data',
		array(
			'class'=>'CButtonColumn',
		),
	),
)); ?>
